#include <stdio.h>
#include <assert.h>

int main()
{
FILE *fin = NULL, *fout = NULL;
char *name_in = "fin.txt", *name_out = "fout.txt";
int asrt_ver_val = 0, i = 0;

fin = fopen (name_in, "r");
assert (fin != NULL);

fout = fopen (name_out, "w");
assert (fout != NULL);

while ( (i = fgetc (fin) ) != EOF)
	{
	asrt_ver_val = fputc ((char) i, fout);
	assert (asrt_ver_val != EOF);
	}

fclose (fin);
fin = NULL;

fclose (fout);
fout = NULL;

return 0;	
}
